package com.ruoyi.slope.monitorPoints.service.impl;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.monitorPoints.mapper.SlopeMonitorpointsMapper;
import com.ruoyi.slope.monitorPoints.domain.SlopeMonitorpoints;
import com.ruoyi.slope.monitorPoints.service.ISlopeMonitorpointsService;

/**
 * 监测点信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-10
 */
@Service
public class SlopeMonitorpointsServiceImpl implements ISlopeMonitorpointsService 
{
    @Autowired
    private SlopeMonitorpointsMapper slopeMonitorpointsMapper;

    /**
     * 查询监测点信息
     * 
     * @param id 监测点信息主键
     * @return 监测点信息
     */
    @Override
    public SlopeMonitorpoints selectSlopeMonitorpointsById(String id)
    {
        return slopeMonitorpointsMapper.selectSlopeMonitorpointsById(id);
    }

    /**
     * 查询监测点信息列表
     * 
     * @param slopeMonitorpoints 监测点信息
     * @return 监测点信息
     */
    @DataScope(deptAlias = "s")
    @Override
    public List<SlopeMonitorpoints> selectSlopeMonitorpointsList(SlopeMonitorpoints slopeMonitorpoints)
    {
        return slopeMonitorpointsMapper.selectSlopeMonitorpointsList(slopeMonitorpoints);
    }

    /**
     * 查询监测点ID列表
     *
     * @param slopeMonitorpoints 监测点信息
     * @return 监测点ID集合
     */
    @DataScope(deptAlias = "s")
    @Override
    public Map<String,String> selectSlopeMonitorPointsId(SlopeMonitorpoints slopeMonitorpoints){
        Map<String,String> map=new LinkedHashMap<String,String>();
        List<SlopeMonitorpoints> list = slopeMonitorpointsMapper.selectSlopeMonitorPointsId(slopeMonitorpoints);
        for(SlopeMonitorpoints l:list){
            map.put(l.getMonitorId(),l.getMonitorId());
        }
        return map;
    }

    /**
     * 新增监测点信息
     * 
     * @param slopeMonitorpoints 监测点信息
     * @return 结果
     */
    @Override
    public int insertSlopeMonitorpoints(SlopeMonitorpoints slopeMonitorpoints)
    {
        return slopeMonitorpointsMapper.insertSlopeMonitorpoints(slopeMonitorpoints);
    }

    /**
     * 修改监测点信息
     * 
     * @param slopeMonitorpoints 监测点信息
     * @return 结果
     */
    @Override
    public int updateSlopeMonitorpoints(SlopeMonitorpoints slopeMonitorpoints)
    {
        return slopeMonitorpointsMapper.updateSlopeMonitorpoints(slopeMonitorpoints);
    }

    /**
     * 批量删除监测点信息
     * 
     * @param ids 需要删除的监测点信息主键
     * @return 结果
     */
    @Override
    public int deleteSlopeMonitorpointsByIds(String[] ids)
    {
        return slopeMonitorpointsMapper.deleteSlopeMonitorpointsByIds(ids);
    }

    /**
     * 删除监测点信息信息
     * 
     * @param id 监测点信息主键
     * @return 结果
     */
    @Override
    public int deleteSlopeMonitorpointsById(String id)
    {
        return slopeMonitorpointsMapper.deleteSlopeMonitorpointsById(id);
    }
}
